package com.lilihub.miaosha.exception;

import com.lilihub.miaosha.common.CodeMsg;
import com.lilihub.miaosha.common.Result;
import com.sun.org.apache.bcel.internal.classfile.Code;
import lombok.Data;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.net.BindException;

/**
 * @BelongsProject: miaosha2
 * @BelongsPackage: com.lilihub.miaosha.exception
 * @Author: LiYing
 * @CreateTime: 2021-04-26 14:07
 * @Description:
 */
@Data
public class GlobalException extends RuntimeException{


    static final long serialVersionUID = 1L;

    private CodeMsg cm;

    public GlobalException(CodeMsg cm){

        super(cm.toString());
        this.cm = cm;

    }

}
